'''
Created on Jun 27, 2013

@author: leo
'''
import os

def getCurrentCommitId():
    return os.popen('git rev-parse --short HEAD').read()[:-2]

def checkout2Commit(commit_id): 
    os.system('git reset %s --HEAD' % commit_id)

def checkout2Branch(branch_name):
    os.system("git checkout %s" % branch_name)

def log(size):
    pass

def getCommitID(size):
    pass


if __name__ == '__main__':
    print getCurrentCommitId()